function confirmurl(url,message) {
	url = url+'&pc_hash='+pc_hash;
	if(confirm(message)) redirect(url);
}
function redirect(url) {
	location.href = url;
}
//滚动条
$(function(){
	$(":text").addClass('input-text');
})

/**
 * 全选checkbox,注意：标识checkbox id固定为为check_box
 * @param string name 列表check名称,如 uid[]
 */
function selectall(name) {
	if ($("#check_box").attr("checked")=='checked') {
		$("input[name='"+name+"']").each(function() {
  			$(this).attr("checked","checked");
			
		});
	} else {
		$("input[name='"+name+"']").each(function() {
  			$(this).removeAttr("checked");
		});
	}
}
function openwinx(url,name,w,h) {
	if(!w) w=screen.width-4;
	if(!h) h=screen.height-95;
	url = url+'&pc_hash='+pc_hash;
    window.open(url,name,"top=100,left=400,width=" + w + ",height=" + h + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
}
//弹出对话框
function omnipotent(id,linkurl,title,close_type,w,h) {
	if(!w) w=700;
	if(!h) h=500;
	art.dialog({id:id,iframe:linkurl, title:title, width:w, height:h, lock:true},
	function(){
		if(close_type==1) {
			art.dialog({id:id}).close()
		} else {
			var d = art.dialog({id:id}).data.iframe;
			var form = d.document.getElementById('dosubmit');form.click();
		}
		return false;
	},
	function(){
			art.dialog({id:id}).close()
	});void(0);
}


function showPic(id){
	var src=$('#'+id).val();
	if(src==""){
		alert("您暂时没有上传图片");
		return false;
	}
	if (self != top) {
		window.top.art.dialog({
			title: "图片浏览",
			content: "<img src='"+src+"' width='500' />",
			// lock: true,//是否锁定屏幕，默认是false
			// fixed: true,//静止在浏览器某个地方不动，不受滚动条拖动影响

		});
	}else{
		art.dialog({
			title: "图片浏览",
			content: "<img src='"+src+"' width='500' />",
			// lock: true,//是否锁定屏幕，默认是false
			// fixed: true,//静止在浏览器某个地方不动，不受滚动条拖动影响

		});
	}



}